package com.itheima.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.itheima.dao.EmployeeDao;
import com.itheima.bean.Employee;
import com.itheima.service.EmployeeService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;


@Transactional
@Service
public class EmployeeServiceImpl extends ServiceImpl<EmployeeDao, Employee> implements EmployeeService {
  /*  @Autowired
    private EmployeeDao employeeDao;

    @Override
    public Employee login(Employee employee) {
        //1.构建条件对象
        LambdaQueryWrapper<Employee> lqw = new LambdaQueryWrapper<>();

        //2.设置条件
        lqw.eq(Employee::getUsername,employee.getUsername());

        String md5Pwd=DigestUtils.md5DigestAsHex(employee.getPassword().getBytes());

        lqw.eq(Employee::getPassword,md5Pwd);

        return employeeDao.selectOne(lqw);
    }*/
}